import java.util.Scanner;

public class HomeWork13_09{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        
        System.out.print("please enter students' name: ");
        String[] stuName = new String[10];
        for(int i = 0; i < stuName.length; i++){
            stuName[i] = scan.next();
        }
        
        SortStr.sortStr(stuName);
        for(String item : stuName){
            System.out.println(item);
        }
    }
}

class SortStr{
    public static String[] sortStr(String[] strArr){
        for(int i = 0; i < strArr.length - 1; i++){
            for(int j = i + 1; j < strArr.length; j++){
                if(strArr[i].compareTo(strArr[j]) > 0){
                    String temp = strArr[i];
                    strArr[i] = strArr[j];
                    strArr[j] = temp;
                }
            }
        }
        return strArr;
    }
}